package com.ruoyi.merchant.mapper;

import java.util.List;

import com.ruoyi.merchant.domain.MerchantCouponIssue;
import org.apache.ibatis.annotations.Param;

/**
 * 优惠券发放记录Mapper接口
 * 
 * @author dongdong
 * @date 2025-10-30
 */
public interface MerchantCouponIssueMapper 
{
    /**
     * 查询优惠券发放记录
     * 
     * @param id 优惠券发放记录主键
     * @return 优惠券发放记录
     */
    public MerchantCouponIssue selectMerchantCouponIssueById(Long id);

    /**
     * 查询优惠券发放记录列表
     * 
     * @param merchantCouponIssue 优惠券发放记录
     * @return 优惠券发放记录集合
     */
    public List<MerchantCouponIssue> selectMerchantCouponIssueList(MerchantCouponIssue merchantCouponIssue);

    /**
     * 新增优惠券发放记录
     * 
     * @param merchantCouponIssue 优惠券发放记录
     * @return 结果
     */
    public int insertMerchantCouponIssue(MerchantCouponIssue merchantCouponIssue);

    /**
     * 修改优惠券发放记录
     * 
     * @param merchantCouponIssue 优惠券发放记录
     * @return 结果
     */
    public int updateMerchantCouponIssue(MerchantCouponIssue merchantCouponIssue);

    /**
     * 删除优惠券发放记录
     * 
     * @param id 优惠券发放记录主键
     * @return 结果
     */
    public int deleteMerchantCouponIssueById(Long id);

    /**
     * 批量删除优惠券发放记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMerchantCouponIssueByIds(Long[] ids);

    MerchantCouponIssue selectMerchantCouponIssueByCouponCode(String couponCode);

    MerchantCouponIssue selectMerchantCouponIssueByCarNum(@Param("carNum") String carNum, @Param("parkId") Long parkId);

    String selectParkingRecordInByCarNum(@Param("carNum") String carNum, @Param("couponId") Long couponId);

    MerchantCouponIssue selectMerchantCouponIssueByRecordId(String recordId);
}
